package com.wuercloud.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

import com.wuercloud.dao.ServiceDao;
import com.wuercloud.entity.ServiceEntity;
import com.wuercloud.service.ServiceService;

@Service("serviceService")
public class ServiceServiceImpl implements ServiceService {
	@Autowired
	private ServiceDao serviceDao;

	@Override
	public ServiceEntity queryObject(Integer serviceId) {
		return serviceDao.queryObject(serviceId);
	}

	@Override
	public List<ServiceEntity> queryList(Map<String, Object> map) {
		return serviceDao.queryList(map);
	}

	@Override
	public int queryTotal(Map<String, Object> map) {
		return serviceDao.queryTotal(map);
	}

	@Override
	@Transactional
	public void save(ServiceEntity service) {

		serviceDao.save(service);
	}

	@Override
	public void update(ServiceEntity service) {
		serviceDao.update(service);
	}

	@Override
	public void delete(Integer serviceId) {
		serviceDao.delete(serviceId);
	}

	@Override
	public void deleteBatch(Integer[] serviceIds) {
		serviceDao.deleteBatch(serviceIds);
	}

}
